package com.inifitness.admin.core.system.converter;


import com.inifitness.admin.core.system.model.entity.SysMenu;
import com.inifitness.admin.core.system.model.form.MenuForm;
import com.inifitness.admin.core.system.model.vo.MenuVO;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * 菜单对象转换器
 *
 * @author sunjinfeng
 * @since 2024/04/18 11:00:00
 */
@Mapper(componentModel = "spring")
public interface MenuConverter {

  @Mapping(target = "children", ignore = true)
  MenuVO entity2Vo(SysMenu entity);

  MenuForm entity2Form(SysMenu entity);

  SysMenu form2Entity(MenuForm menuForm);
}